<%--
  Created by IntelliJ IDEA.
  User: chris
  Date: 17-5-11
  Time: 上午12:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/header.jsp" %>
<div class="layui-form goods">
    <table class="layui-table">
        <colgroup>
            <col width="50">
            <col width="150">
            <col width="300">
            <col width="50">
            <col width="50">
            <col width="50">
            <col width="50">
            <col width="50">
            <col width="80">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>序号</th>
            <th>商品名称</th>
            <th>商品描述</th>
            <th>图片</th>
            <th>原价</th>
            <th>成交价</th>
            <th>购买数量</th>
            <th>商品总价</th>
            <th>操作</th>
        </tr>
        </thead>
        <tfoot>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <%--<td>其他金额：</td>--%>
            <%--<td>${purchase.excessfee}</td>--%>
            <td>订单总价：</td>
            <td>${purchase.totalprice}</td>
        </tr>
        </tfoot>
        <tbody>
        <c:set var="i" value="${0}" />
        <c:forEach items="${goodsdetails}" var="item">
            <tr>
                <c:set var="i" value="${i+1}" />
                <td>${i}</td>
                <td>${item.name}</td>
                <td>${item.describ}</td>
                <td><a href="${item.photo}" target="_blank"><img src="${item.photo}" width="32px" height="32px"></a></td>
                <td>${item.price}</td>
                <td>${item.actprice}</td>
                <td>${item.numbers}</td>
                <td>${item.sumprice}</td>
                <td>
                    <div class="layui-btn-group">
                        <a class="layui-btn layui-btn-primary layui-btn-small edit2" data-method="edit2" pid="${purchase.id}" gid="${item.id}">
                            <i class="layui-icon">&#xe642;</i>
                        </a>
                        <a class="layui-btn layui-btn-primary layui-btn-small delete2" data-method="delete2" pid="${purchase.id}" gid="${item.id}">
                            <i class="layui-icon">&#xe640;</i>
                        </a>
                    </div>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>
<div class="layui-form-item">
    <div class="layui-input-block">
        <a class="layui-btn closeFull layui-btn-normal">关闭</a>
    </div>
</div>

<form id="purchaseCars" class="layui-form" hidden>
    <br>
    <div class="layui-form-item">
        <label class="layui-form-label">商品名称</label>
        <div class="layui-input-block">
            <input readonly type="text" id="goodname" name="goodname" autocomplete="off" class="layui-input" style="width: 95%">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">成交价</label>
        <div class="layui-input-block">
            <input  type="text" id="actprice" name="actprice"  required  lay-verify="required" placeholder="请输入成交价" autocomplete="off" class="layui-input" style="width: 95%">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">购买数量</label>
        <div class="layui-input-block">
            <input type="text" id="numbers" name="numbers" required  lay-verify="required" placeholder="请输入数量" autocomplete="off" class="layui-input" style="width: 95%">
        </div>
    </div>
</form>